﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 数组最小值
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] array = { 5, 1, 7, -2 };
            int min = array[0]; //假设开头的就是最小的
            for (int i = 1; i < array.Length; i++)
            {
                if (array[i]<min)
                {
                    min = array[i];
                }
            }
            Console.WriteLine("最小值:"+min);

        }
    }
}
